package study;
/**
 * @author Abner
 * @date 2021/10/17 20:24
 * @email songkd90@163.com
 * @description
 */
public class ExerciseWeek04 extends ClassLoader{
    private long count = 0;

    public static void main(String[] args) throws InterruptedException {
        ExerciseWeek04 test4 = new ExerciseWeek04();
        Thread thread = new Thread(()->{
            test4.count = test4.add100Times();
        });

        thread.start();
        thread.join();

        System.out.println(test4.count);
    }

    private int add100Times() {
        int x = 0;
        while (x++ < 100) {
            x += 1;
        }
        return x;
    }

}
